package com.allwees.bs.c.module.order.req;

import com.allwees.bs.core.modelbase.constant.ErrorMessage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderReviewReq {

	@NotEmpty(message= ErrorMessage.PARAM_NOT_NULL)
	private String orderUuid;

	@NotEmpty(message=ErrorMessage.PARAM_NOT_NULL)
	private String orderItemUuid;

	@NotNull(message=ErrorMessage.PARAM_NOT_NULL)
	@Range(min=1,max=5,message=ErrorMessage.PARAM_RANGE_ERROR)
//	@ApiModelProperty(value="评分,1到5分",example="5",required=true)
	private Integer rating;

	@Length(max=800,message=ErrorMessage.PARAM_LENGTH_ERROR)
//	@ApiModelProperty(value="评价内容,可以不填")
	private String text;

	@Size(max=20,message=ErrorMessage.PARAM_LENGTH_ERROR)
//	@ApiModelProperty(value="评价图片,可以为空")
	private List<String> photos;
}
